package org.lwd.datalink.domain.plugin.reader.dummy;

import lombok.Getter;
import lombok.Setter;
import org.lwd.datalink.domain.Position;

/**
 * @Author: weidong.lin
 */
@Getter
@Setter
public class DummyReaderPosition extends Position {
    private static final long serialVersionUID = 6949575133033447654L;

    private long count;

    public DummyReaderPosition() {

    }

    public DummyReaderPosition(long count) {
        this.count = count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DummyReaderPosition that = (DummyReaderPosition) o;

        return count == that.count;

    }

    @Override
    public int hashCode() {
        return (int) (count ^ (count >>> 32));
    }
}
